using IQIGame.Onigao.Framework;

namespace IQIGame.Onigao.Logic
{
    public abstract class LogicBaseEntityComponent : IReusableClass
    {
        public abstract uint MaxStore { get; }
        public abstract void Awake(BaseEntity entity);
        public abstract void LogicOnUpdate();
        public abstract void OnRelease();

        public bool isReleased { get; private set; } = true;

        public void OnInit(BaseEntity entity)
        {
            isReleased = false;
            Awake(entity);
        }

        public void OnReset()
        {
            isReleased = true;
            OnRelease();
        }
    }
}
